package com.nwpu.coursesupport.mapper;

import java.util.List;

import org.apache.ibatis.session.RowBounds;

import com.nwpu.coursesupport.criteria.BatchClassStudentSearchCriteria;
import com.nwpu.coursesupport.criteria.ClassStudentSearchCriteria;
import com.nwpu.coursesupport.criteria.StudentInCourseSearchCriteria;
import com.nwpu.coursesupport.criteria.StudentManagerSearchCriteria;
import com.nwpu.coursesupport.entity.ClassStudent;
import com.nwpu.coursesupport.entity.Student;
import com.nwpu.coursesupport.service.param.IDListParam;
import com.nwpu.coursesupport.view.StudentManagerView;

public interface ClassStudentMapper extends BaseMapper<ClassStudent>{

	public int batchDelete(IDListParam p);
	public int batchSave(List<ClassStudent> list);
	
	public int batchUpdate(List<ClassStudent> list);
	
	//根据条件搜索学生
	public List<Student> findStudentByParam(ClassStudentSearchCriteria sc);
	public List<Student> findStudentByParam(ClassStudentSearchCriteria sc,RowBounds bounds);
	public int countStudentByParam(ClassStudentSearchCriteria sc);
	
	public List<Integer> findByIds(BatchClassStudentSearchCriteria sc);
	
	public StudentManagerView getManagerView(StudentManagerSearchCriteria sc); 
	public List<Student> getStudentByCourseId(StudentInCourseSearchCriteria sc);
	
	public List<ClassStudent> getGradeItem(ClassStudentSearchCriteria sc);

	public List<String> findClassNumberByCourseId(int id);
}